home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20030409-20031118 / 000311_fdc@columbia.edu_Sat Sep 27 11:34:34 EDT 2003.msg < prev    next >
Text File  |  2020-01-01  |  1KB  |  37 lines

  1. Article: 14555 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!news-not-for-mail
  3. From: fdc@sesame.cc.columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Re: Array assignment problem
  6. Date: 27 Sep 2003 11:34:30 -0400
  7. Organization: Columbia University
  8. Lines: 19
  9. Message-ID: <bl4am6$7m1$1@sesame.cc.columbia.edu>
  10. References: <Eu1db.229$3I6.194268280@newssvr11.news.prodigy.com>
  11. Reply-To: fdc@columbia.edu
  12. NNTP-Posting-Host: sesame.cc.columbia.edu
  13. X-Trace: newsmaster.cc.columbia.edu 1064676870 9544 128.59.59.56 (27 Sep 2003 15:34:30 GMT)
  14. X-Complaints-To: postmaster@columbia.edu
  15. NNTP-Posting-Date: 27 Sep 2003 15:34:30 GMT
  16. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14555
  17.  
  18. In article <Eu1db.229$3I6.194268280@newssvr11.news.prodigy.com>,
  19. Jun Zhang  <nugulus@netscape.net> wrote:
  20. : fopen /read \%c phonelist
  21. : while true {
  22. : fread /line \%c record
  23. : echo "The line read in is \m(record)"    ; Got "5035 rootpass", fine.
  24. : void \fsplit(\m(record),&a)
  25. : echo "Phonenumber is \&a[0]"             ; Got "phonenumber is 3",
  26. :                                           ;  instead of 5035.
  27. : What's wrong?
  28. As explained in the documentation, the 0th element of an array contains
  29. the number of elements in the array.  The data elements begin at 1.
  30.  
  31. You can see what's in an array with "show array", in this case:
  32.  
  33.   show array a
  34.  
  35. - Frank
  36.